package com.example.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-12-01
 * Time: 10:33
 */
@RestController
public class TestController {
    @Autowired
    private Student student;
    @Autowired
    private ListTest listTest;

    private static Logger logger = LoggerFactory.getLogger(TestController.class);
    @RequestMapping("/hi")
    public String sayHi() {
        System.out.println(student.getAge());

       return "hi";
    }
    @RequestMapping("/hello")
    public String sayHello() {
        logger.trace("I am trace");
        logger.debug("I an debug");
        logger.info("I am info");
        logger.warn("I am warn");
        logger.error("I an error");
        System.out.println(listTest.getDptypes().get(0));
        return "hello 你好";
    }
}
